$(document).ready(function() {
	
		 $("#btnAdjustment").click(function(){
			 var dormitoryNumberId=$.trim($("#dormitoryNumberId").val());
			 if(""==dormitoryNumberId){
				 jBox.confirm("请输入宿舍号", "提示", { id:'hahaha', showScrolling: false, buttons: { '关闭': true } });
			 		 
			 }
			 else{
			  obj = document.getElementsByName("checkboxName");
		       check_val = [];
		      for(k in obj){
		            if(obj[k].checked)
		              check_val.push(obj[k].value);
		       }
		      if(check_val.length!=0){
		    	  if(check_val.length<=6){
			 top.$.jBox.confirm("确认要调整房间吗？","系统提示",function(v,h,f){
					if(v=="ok"){
					    	var idstr=check_val.join(',');//将数组元素连接起来以构建一个字符串  
					    	alert(idstr);  
					    	var ctx=$("#inputCtx").val();
							$("#searchForm").attr("action",ctx+"/students/dmsStudents/adjustmentoOtherSide?idstr="+idstr);
							$("#searchForm").submit();
						
					  } 
				},{buttonsFocus:1});
				top.$('.jbox-body .jbox-icon').css('top','55px');
				}else  jBox.confirm("选择人数不能超过6人！", "提示", { id:'hahaha', showScrolling: false, buttons: { '关闭': true } });
		      }else jBox.confirm("请选择学生！", "提示", { id:'hahaha', showScrolling: false, buttons: { '关闭': true } });}
	  });

	  
	  
   /* $("#btnExport").click(function(){
		top.$.jBox.confirm("确认要导出用户数据吗？","系统提示",function(v,h,f){
			if(v=="ok"){
			var ctx=$("#inputCtx").val();
				$("#searchForm").attr("action",ctx+"/students/dmsStudents/export");
				$("#searchForm").submit();
			}
		},{buttonsFocus:1});
		top.$('.jbox-body .jbox-icon').css('top','55px');
	});
	$("#btnImport").click(function(){
		$.jBox($("#importBox").html(), {title:"导入数据", buttons:{"关闭":true}, 
			bottomText:"导入文件不能超过5M，仅允许导入“xls”或“xlsx”格式文件！"});
	});*/
	
});
		function page(n,s){
			$("#pageNo").val(n);
			$("#pageSize").val(s);
			$("#searchForm").submit();
        	return false;
        }